﻿@using AP.Framework.Utilities.MvcPager
@model PagedList<ApCMS.Models.ProductModels>
@{
    ViewBag.Title = "Product";
}
<div id="heroBanner">
    <a href="#">
        <img alt="" src="@Url.Content("~/Themes/ymdz/Content/images/banner.jpg")" /></a>
</div>
<div class="boxContainer grid_9 alpha omega">
    <h2>
        产品展示</h2>
    <div class="grid_9 alpha">
        <div class="box above">
            @using (Html.BeginForm("Index", "Product", FormMethod.Get))
            {
                <fieldset>
                    <span>
                        <label for="mainSearchBox">
                            产品分类：</label>
                        @Html.DropDownList("ProductCate", (IEnumerable<SelectListItem>)ViewBag.ProductCategoryList, "--请选择--")
                    </span><span>
                        <label for="mainSearchBox">
                            名称：</label>
                        <input type="text" class="searchText" name="SearchValue">
                    </span><span>
                        <input type="submit" class="button" value="搜索" />
                    </span>
                </fieldset>
            }
        </div>
    </div>
    <div class="clear">
    </div>
    @if (Model != null)
    {
        foreach (var list in Model)
        {
        <div class="grid_3 alpha">
            <div class="box above">
                <div class="linklist">
                    <img class="small"  alt="@(list.Name)" src="@(list.Photo)" />
                    <h3>
                        名称： @list.Name</h3>
                    <p>
                        描述：@list.Description
                    </p>
                </div>
            </div>
        </div>
        }
    }
    <div class="clear">
    </div>
    <div style="margin: 5px 5px 5px 5px;">
        @Html.Pager(Model, new PagerOptions { PageIndexParameterName = "page" })</div>
</div>
